package modle

import "gorm.io/gorm"

// 视频表
type Video struct {
	gorm.Model
	Title        string `gorm:"type:varchar(50);not null;index;comment:视频标题"`
	Desc         string `gorm:"type:varchar(255);not null;index;comment:视频描述"`
	CoverUrl     string `gorm:"type:varchar(255);not null;index;comment:视频封面"`
	Status       int    `gorm:"type:tinyint;not null;index;default:0;comment:状态：0-连载，1-完结"`
	Types        int    `gorm:"type:tinyint;not null;index;default:0;comment:类型：0-喜剧，1-爱情，2-动作"`
	Channel      int    `gorm:"type:tinyint;not null;index;default:0;comment:类型：0-电影，1-电视剧"`
	PlayCount    int    `gorm:"type:int;not null;index;default:0;comment:播放数量"`
	LikeCount    int    `gorm:"type:int;not null;index;default:0;comment:点赞数量"`
	CommentCount int    `gorm:"type:int;not null;index;default:0;comment:评论数量"`
	CollectCount int    `gorm:"type:int;not null;index;default:0;comment:收藏数量"`
}

// 剧集表
type VideoEp struct {
	gorm.Model
	VideoId  int    `json:"videoId" form:"videoId"`
	Title    string `json:"title" form:"title"`
	EpNum    int    `json:"ep_num" form:"ep_num"`
	EpTime   string `json:"ep_time" form:"ep_time"`
	EpTimeAt string `json:"ep_time_at" form:"ep_time_at"`
}

// 视频详情表
type VideoData struct {
	gorm.Model
	VideoId      int    `json:"videoId" form:"videoId"`
	Title        string `json:"title" form:"title"`
	Rating       string `json:"rating" form:"rating;comment:评分"`
	Introduction string `json:"introduction" form:"introduction;comment:简介"`
}

// 用户表
type User struct {
	gorm.Model
	Phone    string `json:"phone" form:"phone"`
	Password string `json:"password" form:"password"`
}
